<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<nav class="navbar navbar-default" role="navigation">
	<!-- Brand and toggle get grouped for better mobile display -->
	<div class="navbar-header">
	    <sec:authorize access="hasRole('ROLE_USER')">
			<a class="navbar-brand" href="<%=request.getContextPath() %>/home">Home</a>
	    </sec:authorize>
	</div>

	<!-- Collect the nav links, forms, and other content for toggling -->
	<div class="collapse navbar-collapse">
	    <ul class="nav navbar-nav navbar-right">
			<li class="navbar-brand"><sec:authentication property="principal.username" /></li>
			<li><a href="<%=request.getContextPath() %>/user/setting" class="headerLink">Setting</a></li>
		    <li><a href="<%=request.getContextPath() %>/logout" class="headerLink">Log out</a></li>
		</ul>
  	</div><!-- /.navbar-collapse -->
</nav>